package com.dowsure.apisaas.model;

import com.dowsure.apisaas.annotation.RequestParamValidated;
import com.dowsure.apisaas.enums.BankCardTypeEnums;
import com.dowsure.apisaas.enums.CurrencyEnums;
import com.dowsure.apisaas.enums.OverdueStatusEnums;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @program: apisaas-sdk
 * @description: 请求强制划扣请求参数
 * @author: Dowsure
 * @create: 2022-02-15 18:43
 **/
@Data
public class PspRepaymentRequestParams {

    /**
     * Dowsure 卖家申请单编号
     */
    @RequestParamValidated(required = true, msg = "Dowsure 卖家申请单编号", maxLen = 32)
    private String applicationCode;

    /**
     * 商户卡号，会进行三要素校验，需要明文。
     */
    @RequestParamValidated(required = true, msg = "商户卡号", maxLen = 32)
    private String cardNumber;

    /**
     * 卡类型，个人卡或企业对公卡
     * PERSONAL（个人）、ENTERPRISE（企业对公卡）
     */
    @RequestParamValidated(required = true, msg = "卡类型")
    private BankCardTypeEnums cardType;

    /**
     * 账户名称，银行卡账户名称（人名或企业名称）
     */
    @RequestParamValidated(required = true, msg = "账户名称", maxLen = 100)
    private String cardName;

    /**
     * 银行名称，开户行名称
     */
    @RequestParamValidated(required = true, msg = "银行名称", maxLen = 100)
    private String bankName;

    /**
     * 支行名称，开户行支行名称
     */
    @RequestParamValidated(msg = "支行名称", maxLen = 100)
    private String openBankName;

    /**
     * 大额行号
     */
    @RequestParamValidated(msg = "大额行号", maxLen = 32)
    private String openBankNo;

    /**
     * 币种（ISO 4217 currency codes）
     * CNY（人民币）默认:CNY
     */
    @RequestParamValidated(msg = "币种")
    private CurrencyEnums currency;

    /**
     * 还款金额
     */
    @RequestParamValidated(required = true, msg = "还款金额")
    private BigDecimal repaymentAmount;

    /**
     * 用户侧贷款编号
     */
    @RequestParamValidated(required = true, msg = "用户侧贷款编号", maxLen = 32)
    private String loanCode;

    /**
     * 用户侧贷款合同编号
     */
    @RequestParamValidated(msg = "用户侧贷款合同编号", maxLen = 32)
    private String loanContractNo;

    /**
     * 用户侧业务ID，该ID唯一，用于后续取消操作
     */
    @RequestParamValidated(required = true, msg = "用户侧业务ID", maxLen = 32)
    private String bizId;

    @RequestParamValidated(required = true, msg = "逾期状态")
    private OverdueStatusEnums overdueStatus;

    @RequestParamValidated(msg = "划扣原因", maxLen = 256)
    private String reason;
}
